import request from "../utils/request";

//员工列表查询-条件分页查询
export const queryPageApi = (name,degree,clazzId,page,pageSize) => {
    return request.get(`/students?name=${name}&degree=${degree}&clazzId=${clazzId}&page=${page}&pageSize=${pageSize}`)
}

// 新增员工
export const addApi = (stu) => {
    return request.post('/students',stu)
}

// 修改员工--查询回显-根据ID查询
export const queryInfoApi = (id) => {
    return request.get(`/students/${id}`)
}

// 修改-保存
export const updateApi = (stu) => {
    return request.put('/students',stu)
}

// 违纪处理
export const violationApi = (id,score) => {
    return request.put(`/students/violation/${id}/${score}`)
}

// 删除员工
export const deleteApi = (ids) => {
    return request.delete(`/students/${ids}`)
}
